Serialize hastegeo-publish workflow runs to fix RC version race in "prepare" - #190
Draft
Anthony Cintron (prbatero) with Copilot wants to merge 3 commits into
Draft
Serialize hastegeo-publish workflow runs to fix RC version race in "prepare"#190Anthony Cintron (prbatero) with Copilot wants to merge 3 commits into
Anthony Cintron (prbatero) with Copilot wants to merge 3 commits into
Conversation
Co-authored-by: prbatero <42007693+prbatero@users.noreply.github.com>
Co-authored-by: prbatero <42007693+prbatero@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job 'prepare'
Serialize hastegeo-publish workflow runs to fix RC version race in "prepare"
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Job
prepareinPublish hastegeo wheel and imageswas failing withValueError: Not a valid wheel ZIP file: .... Root cause: two concurrent PR builds independently resolved the same "next" RC number (e.g.1.0.40rc1), sincepublish-rc's concurrency group only serialized publishing, not the earlierpreparejob where the version is computed. Whichever run published second permanently broke — itspreparejob kept re-resolving to a higher RC number (rc2,rc3, ...) on every retry, but its build artifact was fixed at build time to the original (now-taken) name, so the expected file could never be found.Fix
concurrencygroup (hastegeo-publish,cancel-in-progress: false) tohastegeo-publish.yml, serializing entire runs end-to-end instead of only thepublish-rcjob. This guaranteespreparealways resolves against the fully up-to-date release state.publish_hastegeo_wheel.py'svalidate_wheelto raise a clear, actionable error when the expected wheel file is simply missing, rather than the misleading "invalid ZIP" message.Note
This closes the race for future runs. The specific stuck PR whose build artifact is permanently named with an already-taken RC number still needs a fresh build to pick up the next available version — no code change can retroactively rename an already-built artifact.
Type of change
Checklist
cd hastelib && hatch run test:pytest) and the UI lints clean (cd ui && npm run lint)Testing
Ran the full
hastelib/tests/buildsuite (python -m unittest discover -s hastelib/tests/build) — 53 tests pass, including two new regression tests (test_publish_workflow_runs_are_serialized,test_validate_wheel_reports_missing_file_clearly). Verified the updated YAML parses cleanly and rancodeql_checkerwith 0 alerts.Additional context
Diagnosed via GitHub Actions logs for run 33539011240: attempt 1's
publish-rcfailed with "Release asset already exists" forhastegeo-1.0.40rc1-py3-none-any.whl(published by a concurrent run in the ~20s window afterpreparere-resolved but beforepublish-rcuploaded); attempts 2–4 then failed inprepareitself as it kept resolving higher RC numbers against a build artifact stuck onrc1.